-- GENERATED SPELL FOR [Portal Guardian] --


function spell0_30892(pUnit, Event) --@Azure Bindings,n/a--
pUnit:FullCastSpellOnTarget(58526,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30892', 4257, 1)
end

function spell1_30892(pUnit, Event) --@Grievous Wound,n/a--
pUnit:FullCastSpellOnTarget(58517,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30892', 0, 1)
end

function spell2_30892(pUnit, Event) --@Grievous Wound,n/a--
pUnit:FullCastSpellOnTarget(59262,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30892', 0, 1)
end

function spell3_30892(pUnit, Event) --@Overpower,n/a--
pUnit:FullCastSpellOnTarget(58516,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30892', 0, 1)
end

function Sorts_30892(pUnit, Event)
local choix_sorts_30892 = math.random(0, 3)
if choix_sorts_30892 == 0 then
pUnit:RegisterEvent('spell0_30892', 1, 1)
end
if choix_sorts_30892 == 1 then
pUnit:RegisterEvent('spell1_30892', 1, 1)
end
if choix_sorts_30892 == 2 then
pUnit:RegisterEvent('spell2_30892', 1, 1)
end
if choix_sorts_30892 == 3 then
pUnit:RegisterEvent('spell3_30892', 1, 1)
end
end

function mob30892_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30892', math.random(1500, 3000), 1)
end

function mob30892_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30892_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30892_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30892, 1, 'mob30892_Action')
RegisterUnitEvent(30892, 2, 'mob30892_Leave')
RegisterUnitEvent(30892, 3, 'mob30892_Kill')
RegisterUnitEvent(30892, 4, 'mob30892_Die')
